package nk.stack;

import java.util.LinkedList;

public class AB6 {

    public int solve (String s) {


        LinkedList<String> stack = new LinkedList<>();//栈中只保留加减法
        for (int i = 0; i < s.length(); i++) {
            if (s.charAt(i) >= '0' && s.charAt(i) <= '9') {//数字
                int idx = i;
                String temp = "";
                while (idx < s.length() && Character.isDigit(s.charAt(idx))) {
                    temp += s.charAt(idx);
                    idx++;
                }
                //获取数字后，查看栈中是否有乘法运算
                if (!stack.isEmpty() && stack.peek().equals("*")) { //有乘法
                    stack.pop();
                    int num = Integer.parseInt(stack.pop());
//                    stack.push();

                }
            }
        }

        return 0;







    }



}
